package cn.facetoken.homer;

import androidx.room.Dao;
import androidx.room.Delete;
import androidx.room.Insert;
import androidx.room.Query;
import androidx.room.Update;

import java.util.List;

@Dao
interface FaceSampleDao {

    @Query("SELECT * FROM face_sample WHERE id = :id")
    FaceSample load(final long id);

    @Query("SELECT * FROM face_sample WHERE id in (:ids)")
    List<FaceSample> load(final long[] ids);

    @Query("SELECT * FROM face_sample")
    List<FaceSample> loadAll();

    @Insert
    long insert(final FaceSample faceSample);

    @Insert
    long[] insertAll(FaceSample... faceSamples);

    @Update
    int updateAll(FaceSample... faceSamples);

    @Delete
    int delete(final FaceSample faceSample);
}
